﻿<UserControl x:Class="TestRunner.Views.CanvasView"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:windowsToolbar="clr-namespace:Windows.Toolbar.Controls;assembly=Windows.Toolbar"             
    xmlns:vm="clr-namespace:TestRunner.ViewModels"
    d:DataContext="{d:DesignInstance Type=vm:CanvasViewModel, IsDesignTimeCreatable=True}" xmlns:sdk="http://schemas.microsoft.com/winfx/2006/xaml/presentation/sdk"                          
    mc:Ignorable="d"
    d:DesignWidth="500" MinWidth="300" Height="400"             
             >

    <UserControl.Resources>
        <windowsToolbar:ColorConverter x:Key="ColorConverter" />        
    </UserControl.Resources>

    <Canvas>        
        <Rectangle
            Canvas.Top="30"  
            Canvas.Left="200" 
            Fill="{Binding Path=ShapeBackgroundColor, Converter={StaticResource ColorConverter}, Mode=OneWay}"  
            Stroke="{Binding Path=ShapeBorderColor, Converter={StaticResource ColorConverter}, Mode=OneWay}"             
            StrokeThickness="{Binding Path=ShapeBorderThickness, Mode=OneWay}" 
            StrokeDashArray="{Binding Path=ShapeBorderStyle, Mode=OneWay}"
            Width="100"       
            Height="80"            
            />

        <Grid
            Canvas.Top="30"  
            Canvas.Left="200"                                           
            Width="100"       
            Height="80"                                     
            >
            
        <TextBlock Text="Test" 
                       FontSize="{Binding Path=ShapeFontSize, Mode=OneWay}"                                       
                       FontFamily="{Binding Path=ShapeFontFamily, Mode=OneWay}"                    
                       Foreground="{Binding Path=ShapeFontColor, Converter={StaticResource ColorConverter}, Mode=OneWay}" 
                       FontWeight="{Binding Path=ShapeFontWeight, Mode=OneWay}" 
                       FontStyle="{Binding Path=ShapeFontStyle, Mode=OneWay}"  
                       TextDecorations="{Binding Path=ShapeFontDecoration, Mode=OneWay}"  
                       HorizontalAlignment="{Binding Path=ShapeTextAligment, Mode=OneWay}"
                        VerticalAlignment="Center"
                       Margin="5"
                       />

        </Grid>
    </Canvas>
</UserControl>
